﻿using System;
using System.Diagnostics;
using System.ComponentModel;
using System.Configuration.Install;
namespace EventLogSourceInstaller
{
    [RunInstaller(true)]
    public class MyEventLogInstaller : Installer
    {
        private readonly static string LogSource = "PRETLogSource";
        private readonly static string LogName = "PRETLog";

        public EventLogInstaller myEventLogInstaller;
        public MyEventLogInstaller()
        {
            //Create Instance of EventLogInstaller
            myEventLogInstaller = new EventLogInstaller();
            // Set the Source of Event Log, to be created.
            myEventLogInstaller.Source = LogSource;
            // Set the Log that source is created in
            myEventLogInstaller.Log = LogName;
            Installers.Add(myEventLogInstaller);
        }
    }
}